package thread;

import java.util.concurrent.TimeUnit;

/**
 * @classname:Test
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/18 22:28
 * @version: 0.1
 * @since:1.8
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("main线程开始");

        Thread thread = Thread.currentThread();
        thread.setName("新的线程");
        thread.setPriority(1);
        System.out.println(thread);
        System.out.println(thread.getName());
        System.out.println(thread.getId());
        System.out.println(thread.getPriority());
        System.out.println(thread.getState());
        try {
            TimeUnit.MILLISECONDS.sleep(900);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("main线程结束");
    }
}
